<template>
  <div class="container">
    <h1>登录页面</h1>
    <div class="loginPage">
      <el-button type="primary" plain @click="navigateToPage('/userlogin')">用户登录</el-button>
      <el-button type="primary" plain @click="navigateToPage('/adminlogin')">管理员登录</el-button>
    </div>
    <h1>注册页面</h1>
    <div class="registerPage">
      <el-button type="primary" plain @click="navigateToPage('/userregister')">用户注册</el-button>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router";
const router = useRouter();

const navigateToPage = (path) => {
  console.log(path);
  router.push(path);
};
</script>

<style scoped>
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-top: 20px;
}
.el-button {
  width: 300px;
  height: 200px;
  margin: 30px;
}
</style>
